// // https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context("./modules", true, /\.js$/); //内嵌所有模块
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
  // set './app.js' => 'app'
  const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
  const value = modulesFiles(modulePath);
  modules[moduleName] = value.default;
  return modules;
}, {}); //模块注册

const {
  admin,
  area,
  value,
  login,
  table,
  customer,
  tenant,
  config,
  carrier,
  device,
  basic,
  menu,
  resource,
  consignee,
  goods,
  goodsType,
  cpUserMenu,
  unit,
  vehicle,
  driver,
  receivingAddress,
  shippingAddress,
  orderNew,
  role,
  user,
  upload,
  contract,
  station,
  transport,
  onebill,
  splitting,
  quotation,
  finance,
  equipment,
  dtEquipment,
  reportForms,
  deviceImport,
  seal,
  wxapi,
  exports,
  track,
  top,
  cert,
  jiajia,
  ere,
  customExports
} = modules;

const order = orderNew;

export {
  order,
  admin,
  area,
  value,
  login,
  table,
  customer,
  tenant,
  config,
  carrier,
  device,
  basic,
  menu,
  resource,
  consignee,
  goods,
  goodsType,
  cpUserMenu,
  unit,
  vehicle,
  driver,
  receivingAddress,
  shippingAddress,
  role,
  user,
  upload,
  contract,
  station,
  transport,
  onebill,
  splitting,
  quotation,
  finance,
  equipment,
  dtEquipment,
  reportForms,
  deviceImport,
  seal,
  wxapi,
  exports,
  track,
  top,
  cert,
  jiajia,
  ere,
  customExports
};
